package com.xzy.wxpaydemo.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

@Component
@Configuration
@ConfigurationProperties(prefix = "wxpay")
public class WxPayConfig {
    private static String appid;//微信公众号或者小程序等的appid
    private static String secret;//微信公众号或者小程序等的密钥
    private static String mchid;//微信支付商户号
    private static String mchkey;//微信支付商户密钥
    private static String noticeUrl;//回调地址

    public WxPayConfig() {
    }

    public static String getAppid() {
        return appid;
    }

    public  void setAppid(String appid) {
        WxPayConfig.appid = appid;
    }

    public static String getSecret() {
        return secret;
    }

    public  void setSecret(String secret) {
        WxPayConfig.secret = secret;
    }

    public static String getMchid() {
        return mchid;
    }

    public  void setMchid(String mchid) {
        WxPayConfig.mchid = mchid;
    }

    public static String getMchkey() {
        return mchkey;
    }

    public  void setMchkey(String mchkey) {
        WxPayConfig.mchkey = mchkey;
    }

    public static String getNoticeUrl() {
        return noticeUrl;
    }

    public  void setNoticeUrl(String noticeUrl) {
        WxPayConfig.noticeUrl = noticeUrl;
    }
}
